/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GIngreso.java
 *
 * Created on 03/10/2011, 21:09:24
 */

package Personas;

import java.awt.event.ActionListener;
import java.awt.event.KeyListener;
import javax.swing.JTextField;

/**
 *
 * @author nan
 */
public class GModificarPer extends javax.swing.JFrame {

    /** Creates new form GIngreso */
    public GModificarPer() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextFieldNombre = new javax.swing.JTextField();
        jTextFieldApellido = new javax.swing.JTextField();
        jTextFieldDireccion = new javax.swing.JTextField();
        jTextFieldTelefono = new javax.swing.JTextField();
        jLabelNombre = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldNombreUser = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldContra = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jButtonModificar = new javax.swing.JButton();
        jButtonCancelar = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        TipoUser = new javax.swing.JTextField();

        setTitle("Modificar Persona");

        jTextFieldNombre.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFieldApellido.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFieldDireccion.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jTextFieldDireccion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldDireccionActionPerformed(evt);
            }
        });

        jTextFieldTelefono.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jLabelNombre.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabelNombre.setText("Nombre");

        jLabel2.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel2.setText("Apellido");

        jLabel3.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel3.setText("Direccion");

        jLabel4.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel4.setText("Telefono");

        jTextFieldNombreUser.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jTextFieldNombreUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldNombreUserActionPerformed(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel5.setText("Nombre Usuario");

        jTextFieldContra.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jTextFieldContra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldContraActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel6.setText("Contraseña");

        jButtonModificar.setText("Modificar");
        jButtonModificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonModificarActionPerformed(evt);
            }
        });

        jButtonCancelar.setText("Cancelar");

        jLabel7.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jLabel7.setText("Tipo Usario");

        TipoUser.setFont(new java.awt.Font("Ubuntu", 0, 18));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel6)
                            .addComponent(jLabelNombre)
                            .addComponent(jButtonModificar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jTextFieldNombre)
                                .addComponent(jTextFieldApellido)
                                .addComponent(jTextFieldDireccion)
                                .addComponent(jTextFieldTelefono)
                                .addComponent(jTextFieldNombreUser)
                                .addComponent(jTextFieldContra)
                                .addComponent(TipoUser, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE))
                            .addComponent(jButtonCancelar))))
                .addContainerGap(31, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNombre)
                    .addComponent(jTextFieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jTextFieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldNombreUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jTextFieldContra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(TipoUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonModificar)
                    .addComponent(jButtonCancelar))
                .addContainerGap(55, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldContraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldContraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldContraActionPerformed

    private void jButtonModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModificarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonModificarActionPerformed

    private void jTextFieldNombreUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldNombreUserActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldNombreUserActionPerformed

    private void jTextFieldDireccionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldDireccionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldDireccionActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GModificarPer().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField TipoUser;
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonModificar;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabelNombre;
    private javax.swing.JTextField jTextFieldApellido;
    private javax.swing.JTextField jTextFieldContra;
    private javax.swing.JTextField jTextFieldDireccion;
    private javax.swing.JTextField jTextFieldNombre;
    private javax.swing.JTextField jTextFieldNombreUser;
    private javax.swing.JTextField jTextFieldTelefono;
    // End of variables declaration//GEN-END:variables

    public void setActionListeners(ActionListener lis){
        this.getjButtonModificar().addActionListener(lis);
        this.getjButtonCancelar().addActionListener(lis);
        
    }

    void setKeyListener(KeyListener lis) {
        this.getjTextFieldNombre().addKeyListener(lis);
        this.getjTextFieldApellido().addKeyListener(lis);
        this.getjTextFieldDireccion().addKeyListener(lis);
        this.getjTextFieldTelefono().addKeyListener(lis);
        this.getjTextFieldNombreUser().addKeyListener(lis);
        this.getjTextFieldContra().addKeyListener(lis);
        this.getTipoUser().addKeyListener(lis);
    }

    /**
     * @return the jButtonAceptar
     */
    public javax.swing.JButton getjButtonAceptar() {
        return getjButtonModificar();
    }

    /**
     * @return the jButtonCancelar
     */
    public javax.swing.JButton getjButtonCancelar() {
        return jButtonCancelar;
    }

    public javax.swing.JTextField getTipoUser() {
        return TipoUser;
    }

    /**
     * @return the jTextFieldApellido
     */
    public javax.swing.JTextField getjTextFieldApellido() {
        return jTextFieldApellido;
    }

    /**
     * @return the jTextFieldContra
     */
    public javax.swing.JTextField getjTextFieldContra() {
        return jTextFieldContra;
    }


    /**
     * @return the jTextFieldDireccion
     */
    public javax.swing.JTextField getjTextFieldDireccion() {
        return jTextFieldDireccion;
    }

    /**
     * @return the jTextFieldNombre
     */
    public javax.swing.JTextField getjTextFieldNombre() {
        return jTextFieldNombre;
    }

    /**
     * @return the jTextFieldNombreUser
     */
    public javax.swing.JTextField getjTextFieldNombreUser() {
        return jTextFieldNombreUser;
    }

    /**
     * @return the jTextFieldTelefono
     */
    public javax.swing.JTextField getjTextFieldTelefono() {
        return jTextFieldTelefono;
    }

    /**
     * @return the jButtonModificar
     */
    public javax.swing.JButton getjButtonModificar() {
        return jButtonModificar;
    }



    

}
